const getters = {
    getToken(state) {
        return state.token;
    },
    getLevel: (state) => (level) => {
        return state[level]
    },
    getLevelone(state) {
        return state.novice;
    },
    getUserId(state) {
        return state.userId
    },
    getUserName(state) {
        return state.userName;
    },
    getUgId(state) {
        return state.ugId
    },
    getSessionStorage(state) {
        let userId = window.sessionStorage.getItem('userId')
        let userName = window.sessionStorage.getItem('userName')
        let token = window.sessionStorage.getItem('token')
        let ugId = window.sessionStorage.getItem('ugId')
        state.userId = userId
        state.userName = userName
        state.token = token
        state.ugId=ugId
        return {
            userId,
            userName,
            token,
            ugId
        };
    }
}
export default getters;